<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: helib::Context Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehelib.html">helib</a></li><li class="navelem"><a class="el" href="classhelib_1_1_context.html">Context</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhelib_1_1_context-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">helib::Context Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Maintaining the parameters.  
 <a href="classhelib_1_1_context.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_context_8h_source.html">Context.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab79e1f941d6043131a14404c68bf538c"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ab79e1f941d6043131a14404c68bf538c">noiseBoundForUniform</a> (double magBound, long degBound) const</td></tr>
<tr class="separator:ab79e1f941d6043131a14404c68bf538c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25e83e61a64ed721a1b710a3b2df82d"><td class="memItemLeft" align="right" valign="top">NTL::xdouble&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ab25e83e61a64ed721a1b710a3b2df82d">noiseBoundForUniform</a> (NTL::xdouble magBound, long degBound) const</td></tr>
<tr class="separator:ab25e83e61a64ed721a1b710a3b2df82d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93ce4564b2ec97c85c50e732c04a1b22"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a93ce4564b2ec97c85c50e732c04a1b22">noiseBoundForMod</a> (long modulus, long degBound) const</td></tr>
<tr class="separator:a93ce4564b2ec97c85c50e732c04a1b22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2b4477cbc59e744b735544b60bb4f87"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ac2b4477cbc59e744b735544b60bb4f87">noiseBoundForGaussian</a> (double sigma, long degBound) const</td></tr>
<tr class="separator:ac2b4477cbc59e744b735544b60bb4f87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1eae4b3032d34226da9b04897b414179"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a1eae4b3032d34226da9b04897b414179">noiseBoundForSmall</a> (double prob, long degBound) const</td></tr>
<tr class="separator:a1eae4b3032d34226da9b04897b414179"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca4f48776f48a323315928889c64f0d1"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#aca4f48776f48a323315928889c64f0d1">noiseBoundForHWt</a> (long hwt, <a class="el" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> long degBound) const</td></tr>
<tr class="separator:aca4f48776f48a323315928889c64f0d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30037bfeed9ef5a4282e10b92c149801"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a30037bfeed9ef5a4282e10b92c149801">stdDevForRecryption</a> (long skHwt=0) const</td></tr>
<tr class="memdesc:a30037bfeed9ef5a4282e10b92c149801"><td class="mdescLeft">&#160;</td><td class="mdescRight">NOTE: this is a bit heuristic. See design document for details.  <a href="classhelib_1_1_context.html#a30037bfeed9ef5a4282e10b92c149801">More...</a><br /></td></tr>
<tr class="separator:a30037bfeed9ef5a4282e10b92c149801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d1a18803b7a39ff477bf3318aa98be5"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a6d1a18803b7a39ff477bf3318aa98be5">boundForRecryption</a> (long skHwt=0) const</td></tr>
<tr class="separator:a6d1a18803b7a39ff477bf3318aa98be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a400f1f138bef615ed0b8f19bdc2bd8ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a400f1f138bef615ed0b8f19bdc2bd8ce">setModSizeTable</a> ()</td></tr>
<tr class="separator:a400f1f138bef615ed0b8f19bdc2bd8ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08ad8299f225b9f8603f8936a98c2453"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a08ad8299f225b9f8603f8936a98c2453">Context</a> (unsigned long m, unsigned long p, unsigned long r, const std::vector&lt; long &gt; &amp;gens=std::vector&lt; long &gt;(), const std::vector&lt; long &gt; &amp;ords=std::vector&lt; long &gt;())</td></tr>
<tr class="separator:a08ad8299f225b9f8603f8936a98c2453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb97afc7e74b0b7522c4168d8db2b374"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#aeb97afc7e74b0b7522c4168d8db2b374">makeBootstrappable</a> (const NTL::Vec&lt; long &gt; &amp;mvec, long skWht=0, bool build_cache=false, bool alsoThick=true)</td></tr>
<tr class="separator:aeb97afc7e74b0b7522c4168d8db2b374"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb8f32691d102e0390b5770526c8d4fd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#abb8f32691d102e0390b5770526c8d4fd">isBootstrappable</a> () const</td></tr>
<tr class="separator:abb8f32691d102e0390b5770526c8d4fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f143c4d8e8fde51e2fce121a904eb0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a8f143c4d8e8fde51e2fce121a904eb0a">fullPrimes</a> () const</td></tr>
<tr class="separator:a8f143c4d8e8fde51e2fce121a904eb0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb3ebd14d55203e09b351b88eca17a44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#acb3ebd14d55203e09b351b88eca17a44">allPrimes</a> () const</td></tr>
<tr class="separator:acb3ebd14d55203e09b351b88eca17a44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfe778f83df73ee943f9fc25741efa2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#abfe778f83df73ee943f9fc25741efa2e">getCtxtPrimes</a> (long nprimes) const</td></tr>
<tr class="separator:abfe778f83df73ee943f9fc25741efa2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3feef5466cf8ed4878446d0142ac0be4"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a3feef5466cf8ed4878446d0142ac0be4">BPL</a> () const</td></tr>
<tr class="separator:a3feef5466cf8ed4878446d0142ac0be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6f113ef16d2e6c1ca451411e34eed42"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ae6f113ef16d2e6c1ca451411e34eed42">operator==</a> (const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;other) const</td></tr>
<tr class="separator:ae6f113ef16d2e6c1ca451411e34eed42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d08d9248d0d3165fa5914b95bd60fdf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a3d08d9248d0d3165fa5914b95bd60fdf">operator!=</a> (const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;other) const</td></tr>
<tr class="separator:a3d08d9248d0d3165fa5914b95bd60fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2da1bad87f9c90f15b70cb14777685d"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#aa2da1bad87f9c90f15b70cb14777685d">ithPrime</a> (unsigned long i) const</td></tr>
<tr class="memdesc:aa2da1bad87f9c90f15b70cb14777685d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The ith small prime in the modulus chain.  <a href="classhelib_1_1_context.html#aa2da1bad87f9c90f15b70cb14777685d">More...</a><br /></td></tr>
<tr class="separator:aa2da1bad87f9c90f15b70cb14777685d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad066ba083a3ba9f4b9627fde8bfa17fe"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_cmodulus.html">Cmodulus</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ad066ba083a3ba9f4b9627fde8bfa17fe">ithModulus</a> (unsigned long i) const</td></tr>
<tr class="memdesc:ad066ba083a3ba9f4b9627fde8bfa17fe"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classhelib_1_1_cmodulus.html" title="Provides FFT and iFFT routines modulo a single-precision prime.">Cmodulus</a> object corresponding to ith small prime in the chain.  <a href="classhelib_1_1_context.html#ad066ba083a3ba9f4b9627fde8bfa17fe">More...</a><br /></td></tr>
<tr class="separator:ad066ba083a3ba9f4b9627fde8bfa17fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a552e300656dfae6eaacace769c03655a"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a552e300656dfae6eaacace769c03655a">numPrimes</a> () const</td></tr>
<tr class="memdesc:a552e300656dfae6eaacace769c03655a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of small prime in the chain.  <a href="classhelib_1_1_context.html#a552e300656dfae6eaacace769c03655a">More...</a><br /></td></tr>
<tr class="separator:a552e300656dfae6eaacace769c03655a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b87d5f0041ad5abe2bcf358cb818343"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a2b87d5f0041ad5abe2bcf358cb818343">isZeroDivisor</a> (const NTL::ZZ &amp;num) const</td></tr>
<tr class="memdesc:a2b87d5f0041ad5abe2bcf358cb818343"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is num divisible by any of the primes in the chain?  <a href="classhelib_1_1_context.html#a2b87d5f0041ad5abe2bcf358cb818343">More...</a><br /></td></tr>
<tr class="separator:a2b87d5f0041ad5abe2bcf358cb818343"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dea4625a64c673ad3147bf18a1d231f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a9dea4625a64c673ad3147bf18a1d231f">inChain</a> (long p) const</td></tr>
<tr class="memdesc:a9dea4625a64c673ad3147bf18a1d231f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is p already in the chain?  <a href="classhelib_1_1_context.html#a9dea4625a64c673ad3147bf18a1d231f">More...</a><br /></td></tr>
<tr class="separator:a9dea4625a64c673ad3147bf18a1d231f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd63a1dac045b9e1225e9b42b7506e64"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#abd63a1dac045b9e1225e9b42b7506e64">logOfPrime</a> (unsigned long i) const</td></tr>
<tr class="memdesc:abd63a1dac045b9e1225e9b42b7506e64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the natural logarithm of the ith prime.  <a href="classhelib_1_1_context.html#abd63a1dac045b9e1225e9b42b7506e64">More...</a><br /></td></tr>
<tr class="separator:abd63a1dac045b9e1225e9b42b7506e64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a237f432913ec39edc41af03384d4475d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a237f432913ec39edc41af03384d4475d">logOfProduct</a> (const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;s) const</td></tr>
<tr class="memdesc:a237f432913ec39edc41af03384d4475d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the natural logarithm of productOfPrimes(s)  <a href="classhelib_1_1_context.html#a237f432913ec39edc41af03384d4475d">More...</a><br /></td></tr>
<tr class="separator:a237f432913ec39edc41af03384d4475d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a065f668db1a4712692fdd2ea9c70dc47"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a065f668db1a4712692fdd2ea9c70dc47">securityLevel</a> () const</td></tr>
<tr class="memdesc:a065f668db1a4712692fdd2ea9c70dc47"><td class="mdescLeft">&#160;</td><td class="mdescRight">An estimate for the security-level.  <a href="classhelib_1_1_context.html#a065f668db1a4712692fdd2ea9c70dc47">More...</a><br /></td></tr>
<tr class="separator:a065f668db1a4712692fdd2ea9c70dc47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa65a6f2210ee990f8f3d4cbc60a6060a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#aa65a6f2210ee990f8f3d4cbc60a6060a">AddSmallPrime</a> (long q)</td></tr>
<tr class="memdesc:aa65a6f2210ee990f8f3d4cbc60a6060a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Just add the given prime to the chain.  <a href="classhelib_1_1_context.html#aa65a6f2210ee990f8f3d4cbc60a6060a">More...</a><br /></td></tr>
<tr class="separator:aa65a6f2210ee990f8f3d4cbc60a6060a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af915dcf0e80c5014ef2dc6911891262d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#af915dcf0e80c5014ef2dc6911891262d">AddCtxtPrime</a> (long q)</td></tr>
<tr class="separator:af915dcf0e80c5014ef2dc6911891262d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc2c4b8400734e630cebe544fbf01cc1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#acc2c4b8400734e630cebe544fbf01cc1">AddSpecialPrime</a> (long q)</td></tr>
<tr class="separator:acc2c4b8400734e630cebe544fbf01cc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:afc6a3c91d2488abe71e82849653b2c40"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#afc6a3c91d2488abe71e82849653b2c40">productOfPrimes</a> (NTL::ZZ &amp;p, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;s) const</td></tr>
<tr class="memdesc:afc6a3c91d2488abe71e82849653b2c40"><td class="mdescLeft">&#160;</td><td class="mdescRight">The product of all the primes in the given set.  <a href="classhelib_1_1_context.html#afc6a3c91d2488abe71e82849653b2c40">More...</a><br /></td></tr>
<tr class="separator:afc6a3c91d2488abe71e82849653b2c40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa10cb4160e67f8fc94dbbcd14be3a7c5"><td class="memItemLeft" align="right" valign="top">NTL::ZZ&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#aa10cb4160e67f8fc94dbbcd14be3a7c5">productOfPrimes</a> (const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;s) const</td></tr>
<tr class="separator:aa10cb4160e67f8fc94dbbcd14be3a7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ab261446cf0a635a7bf1edf081df48d81"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ab261446cf0a635a7bf1edf081df48d81">zMStar</a></td></tr>
<tr class="memdesc:ab261446cf0a635a7bf1edf081df48d81"><td class="mdescLeft">&#160;</td><td class="mdescRight">The structure of Zm*.  <a href="classhelib_1_1_context.html#ab261446cf0a635a7bf1edf081df48d81">More...</a><br /></td></tr>
<tr class="separator:ab261446cf0a635a7bf1edf081df48d81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a8689e8a591a15fdf4f1b5eb7b0b80c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_p_algebra_mod.html">PAlgebraMod</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a9a8689e8a591a15fdf4f1b5eb7b0b80c">alMod</a></td></tr>
<tr class="memdesc:a9a8689e8a591a15fdf4f1b5eb7b0b80c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The structure of Z[X]/(Phi_m(X),p^r)  <a href="classhelib_1_1_context.html#a9a8689e8a591a15fdf4f1b5eb7b0b80c">More...</a><br /></td></tr>
<tr class="separator:a9a8689e8a591a15fdf4f1b5eb7b0b80c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8319e609dbde819ac81130b035711fee"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a8319e609dbde819ac81130b035711fee">ea</a></td></tr>
<tr class="memdesc:a8319e609dbde819ac81130b035711fee"><td class="mdescLeft">&#160;</td><td class="mdescRight">A default <a class="el" href="classhelib_1_1_encrypted_array.html" title="A simple wrapper for a smart pointer to an EncryptedArrayBase. This is the interface that higher-leve...">EncryptedArray</a>.  <a href="classhelib_1_1_context.html#a8319e609dbde819ac81130b035711fee">More...</a><br /></td></tr>
<tr class="separator:a8319e609dbde819ac81130b035711fee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26f5e8b08576bf2ab4632bc8234243e2"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; const <a class="el" href="classhelib_1_1_powerful_d_c_r_t.html">PowerfulDCRT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a26f5e8b08576bf2ab4632bc8234243e2">pwfl_converter</a></td></tr>
<tr class="separator:a26f5e8b08576bf2ab4632bc8234243e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a9dbcc75c6cf5116b8114dccc1f1ab7"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="structhelib_1_1_poly_mod_ring.html">PolyModRing</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a1a9dbcc75c6cf5116b8114dccc1f1ab7">slotRing</a></td></tr>
<tr class="memdesc:a1a9dbcc75c6cf5116b8114dccc1f1ab7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The structure of a single slot of the plaintext space.  <a href="classhelib_1_1_context.html#a1a9dbcc75c6cf5116b8114dccc1f1ab7">More...</a><br /></td></tr>
<tr class="separator:a1a9dbcc75c6cf5116b8114dccc1f1ab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2eaf7ce504e725b8e6be631ff276efc"><td class="memItemLeft" align="right" valign="top">NTL::xdouble&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ad2eaf7ce504e725b8e6be631ff276efc">stdev</a></td></tr>
<tr class="memdesc:ad2eaf7ce504e725b8e6be631ff276efc"><td class="mdescLeft">&#160;</td><td class="mdescRight">sqrt(variance) of the LWE error (default=3.2)  <a href="classhelib_1_1_context.html#ad2eaf7ce504e725b8e6be631ff276efc">More...</a><br /></td></tr>
<tr class="separator:ad2eaf7ce504e725b8e6be631ff276efc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86b3d6e90031da9bc9cef6f46e9e9bda"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a86b3d6e90031da9bc9cef6f46e9e9bda">scale</a></td></tr>
<tr class="separator:a86b3d6e90031da9bc9cef6f46e9e9bda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09e894a14a98620a7f129c992468072f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a09e894a14a98620a7f129c992468072f">ctxtPrimes</a></td></tr>
<tr class="separator:a09e894a14a98620a7f129c992468072f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4237638ccaec9233a0c7edaf334343b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a4237638ccaec9233a0c7edaf334343b2">specialPrimes</a></td></tr>
<tr class="separator:a4237638ccaec9233a0c7edaf334343b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d52169353df3e667210c59c1643e316"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a9d52169353df3e667210c59c1643e316">smallPrimes</a></td></tr>
<tr class="separator:a9d52169353df3e667210c59c1643e316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a739f1b2cb1d0738bcdd8e5474fb05922"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a739f1b2cb1d0738bcdd8e5474fb05922">modSizes</a></td></tr>
<tr class="memdesc:a739f1b2cb1d0738bcdd8e5474fb05922"><td class="mdescLeft">&#160;</td><td class="mdescRight">A helper table to map required modulo-sizes to primeSets.  <a href="classhelib_1_1_context.html#a739f1b2cb1d0738bcdd8e5474fb05922">More...</a><br /></td></tr>
<tr class="separator:a739f1b2cb1d0738bcdd8e5474fb05922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a221facd004b3ace6f11367d6766f9b78"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a221facd004b3ace6f11367d6766f9b78">digits</a></td></tr>
<tr class="memdesc:a221facd004b3ace6f11367d6766f9b78"><td class="mdescLeft">&#160;</td><td class="mdescRight">The set of primes for the digits.  <a href="classhelib_1_1_context.html#a221facd004b3ace6f11367d6766f9b78">More...</a><br /></td></tr>
<tr class="separator:a221facd004b3ace6f11367d6766f9b78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6b7e88d642f51a00c08263aebaa2e20"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_thin_recrypt_data.html">ThinRecryptData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#af6b7e88d642f51a00c08263aebaa2e20">rcData</a></td></tr>
<tr class="memdesc:af6b7e88d642f51a00c08263aebaa2e20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bootstrapping-related data in the context.  <a href="classhelib_1_1_context.html#af6b7e88d642f51a00c08263aebaa2e20">More...</a><br /></td></tr>
<tr class="separator:af6b7e88d642f51a00c08263aebaa2e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a83165f2f0d0a6dd8bb3c3f227e7da1a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a83165f2f0d0a6dd8bb3c3f227e7da1a3">writeContextBinary</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;context)</td></tr>
<tr class="separator:a83165f2f0d0a6dd8bb3c3f227e7da1a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1e445830c6007a7f725e100f19dfe6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#ad1e445830c6007a7f725e100f19dfe6a">readContextBinary</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;context)</td></tr>
<tr class="separator:ad1e445830c6007a7f725e100f19dfe6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">I/O routines</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>To write out all the data associated with a context, do the following:</p>
<div class="fragment"><div class="line"><a class="code" href="classhelib_1_1_context.html#a3a9a7a348aecd453c92d1c077a9af03d">writeContextBase</a>(str, context);</div>
<div class="line">str &lt;&lt; context;</div>
</div><!-- fragment --><p>The first function call writes out just [m p r gens ords], which is the data needed to invoke the context constructor.</p>
<p>The second call writes out all other information, including the stdev field, the prime sequence (including which primes are "special"), and the digits info.</p>
<p>To read in all the data associated with a context, do the following:</p>
<div class="fragment"><div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> m, p, r;</div>
<div class="line">std::vector&lt;long&gt; gens, ords;</div>
<div class="line"> </div>
<div class="line"><a class="code" href="classhelib_1_1_context.html#a40d28a7b77f5735cc6d082452e7126a9">readContextBase</a>(str, m, p, r, gens, ords);</div>
<div class="line"> </div>
<div class="line"><a class="code" href="classhelib_1_1_context.html#a08ad8299f225b9f8603f8936a98c2453">Context</a> context(m, p, r, gens, ords);</div>
<div class="line"> </div>
<div class="line">str &gt;&gt; context;</div>
</div><!-- fragment --><p>The call to readContextBase just reads the values m, p, r and the set of generators in Zm* /(p) and their order. Then, after constructing the context, the &gt;&gt; operator reads in and attaches all other information. </p>
</div></td></tr>
<tr class="memitem:a3a9a7a348aecd453c92d1c077a9af03d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a3a9a7a348aecd453c92d1c077a9af03d">writeContextBase</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;context)</td></tr>
<tr class="memdesc:a3a9a7a348aecd453c92d1c077a9af03d"><td class="mdescLeft">&#160;</td><td class="mdescRight">write [m p r] data  <a href="classhelib_1_1_context.html#a3a9a7a348aecd453c92d1c077a9af03d">More...</a><br /></td></tr>
<tr class="separator:a3a9a7a348aecd453c92d1c077a9af03d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f25fcb8f7047c32e2929d9ffbf4ac11"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a3f25fcb8f7047c32e2929d9ffbf4ac11">operator&lt;&lt;</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;context)</td></tr>
<tr class="memdesc:a3f25fcb8f7047c32e2929d9ffbf4ac11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write all other data.  <a href="classhelib_1_1_context.html#a3f25fcb8f7047c32e2929d9ffbf4ac11">More...</a><br /></td></tr>
<tr class="separator:a3f25fcb8f7047c32e2929d9ffbf4ac11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40d28a7b77f5735cc6d082452e7126a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a40d28a7b77f5735cc6d082452e7126a9">readContextBase</a> (std::istream &amp;str, unsigned long &amp;m, unsigned long &amp;p, unsigned long &amp;r, std::vector&lt; long &gt; &amp;gens, std::vector&lt; long &gt; &amp;ords)</td></tr>
<tr class="memdesc:a40d28a7b77f5735cc6d082452e7126a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">read [m p r] data, needed to construct context  <a href="classhelib_1_1_context.html#a40d28a7b77f5735cc6d082452e7126a9">More...</a><br /></td></tr>
<tr class="separator:a40d28a7b77f5735cc6d082452e7126a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a717438f68d2a050214ee4a8a933a7bba"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_context.html#a717438f68d2a050214ee4a8a933a7bba">operator&gt;&gt;</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;context)</td></tr>
<tr class="memdesc:a717438f68d2a050214ee4a8a933a7bba"><td class="mdescLeft">&#160;</td><td class="mdescRight">read all other data associated with context  <a href="classhelib_1_1_context.html#a717438f68d2a050214ee4a8a933a7bba">More...</a><br /></td></tr>
<tr class="separator:a717438f68d2a050214ee4a8a933a7bba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Maintaining the parameters. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a08ad8299f225b9f8603f8936a98c2453"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08ad8299f225b9f8603f8936a98c2453">&#9670;&nbsp;</a></span>Context()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::Context::Context </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>gens</em> = <code>std::vector&lt;long&gt;()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>ords</em> = <code>std::vector&lt;long&gt;()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af915dcf0e80c5014ef2dc6911891262d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af915dcf0e80c5014ef2dc6911891262d">&#9670;&nbsp;</a></span>AddCtxtPrime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::AddCtxtPrime </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa65a6f2210ee990f8f3d4cbc60a6060a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa65a6f2210ee990f8f3d4cbc60a6060a">&#9670;&nbsp;</a></span>AddSmallPrime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::AddSmallPrime </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Just add the given prime to the chain. </p>

</div>
</div>
<a id="acc2c4b8400734e630cebe544fbf01cc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc2c4b8400734e630cebe544fbf01cc1">&#9670;&nbsp;</a></span>AddSpecialPrime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::AddSpecialPrime </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="acb3ebd14d55203e09b351b88eca17a44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb3ebd14d55203e09b351b88eca17a44">&#9670;&nbsp;</a></span>allPrimes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::allPrimes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a6d1a18803b7a39ff477bf3318aa98be5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d1a18803b7a39ff477bf3318aa98be5">&#9670;&nbsp;</a></span>boundForRecryption()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::boundForRecryption </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>skHwt</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a3feef5466cf8ed4878446d0142ac0be4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3feef5466cf8ed4878446d0142ac0be4">&#9670;&nbsp;</a></span>BPL()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::Context::BPL </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a8f143c4d8e8fde51e2fce121a904eb0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f143c4d8e8fde51e2fce121a904eb0a">&#9670;&nbsp;</a></span>fullPrimes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::fullPrimes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="abfe778f83df73ee943f9fc25741efa2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfe778f83df73ee943f9fc25741efa2e">&#9670;&nbsp;</a></span>getCtxtPrimes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::getCtxtPrimes </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nprimes</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a9dea4625a64c673ad3147bf18a1d231f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dea4625a64c673ad3147bf18a1d231f">&#9670;&nbsp;</a></span>inChain()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::Context::inChain </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is p already in the chain? </p>

</div>
</div>
<a id="abb8f32691d102e0390b5770526c8d4fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb8f32691d102e0390b5770526c8d4fd">&#9670;&nbsp;</a></span>isBootstrappable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::Context::isBootstrappable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a2b87d5f0041ad5abe2bcf358cb818343"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b87d5f0041ad5abe2bcf358cb818343">&#9670;&nbsp;</a></span>isZeroDivisor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::Context::isZeroDivisor </td>
          <td>(</td>
          <td class="paramtype">const NTL::ZZ &amp;&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is num divisible by any of the primes in the chain? </p>

</div>
</div>
<a id="ad066ba083a3ba9f4b9627fde8bfa17fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad066ba083a3ba9f4b9627fde8bfa17fe">&#9670;&nbsp;</a></span>ithModulus()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_cmodulus.html">Cmodulus</a>&amp; helib::Context::ithModulus </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classhelib_1_1_cmodulus.html" title="Provides FFT and iFFT routines modulo a single-precision prime.">Cmodulus</a> object corresponding to ith small prime in the chain. </p>

</div>
</div>
<a id="aa2da1bad87f9c90f15b70cb14777685d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2da1bad87f9c90f15b70cb14777685d">&#9670;&nbsp;</a></span>ithPrime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::Context::ithPrime </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The ith small prime in the modulus chain. </p>

</div>
</div>
<a id="abd63a1dac045b9e1225e9b42b7506e64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd63a1dac045b9e1225e9b42b7506e64">&#9670;&nbsp;</a></span>logOfPrime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::logOfPrime </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the natural logarithm of the ith prime. </p>

</div>
</div>
<a id="a237f432913ec39edc41af03384d4475d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a237f432913ec39edc41af03384d4475d">&#9670;&nbsp;</a></span>logOfProduct()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::logOfProduct </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the natural logarithm of productOfPrimes(s) </p>

</div>
</div>
<a id="aeb97afc7e74b0b7522c4168d8db2b374"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb97afc7e74b0b7522c4168d8db2b374">&#9670;&nbsp;</a></span>makeBootstrappable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::makeBootstrappable </td>
          <td>(</td>
          <td class="paramtype">const NTL::Vec&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>mvec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>skWht</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>build_cache</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>alsoThick</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ac2b4477cbc59e744b735544b60bb4f87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2b4477cbc59e744b735544b60bb4f87">&#9670;&nbsp;</a></span>noiseBoundForGaussian()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::noiseBoundForGaussian </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assume the polynomial f(x) = sum_{i &lt; k} f_i x^i is chosen so that each f_i is chosen uniformly and independently from N(0, sigma^2), and that k = degBound. This returns a bound B such that the L-infty norm of the canonical embedding exceeds B with probability at most epsilon. </p>

</div>
</div>
<a id="aca4f48776f48a323315928889c64f0d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca4f48776f48a323315928889c64f0d1">&#9670;&nbsp;</a></span>noiseBoundForHWt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::noiseBoundForHWt </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>hwt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assume the polynomial f(x) = sum_{i &lt; k} f_i x^i is chosen hwt coefficients are chosen to \pm 1, and the remainder zero. This returns a bound B such that the L-infty norm of the canonical embedding exceeds B with probability at most epsilon. </p>

</div>
</div>
<a id="a93ce4564b2ec97c85c50e732c04a1b22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93ce4564b2ec97c85c50e732c04a1b22">&#9670;&nbsp;</a></span>noiseBoundForMod()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::noiseBoundForMod </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>modulus</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assume the polynomial f(x) = sum_{i &lt; k} f_i x^i is chosen so that each f_i is chosen uniformly and independently from the from the set of balanced residues modulo the given modulus. This returns a bound B such that the L-infty norm of the canonical embedding exceeds B with probability at most epsilon. </p>

</div>
</div>
<a id="a1eae4b3032d34226da9b04897b414179"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1eae4b3032d34226da9b04897b414179">&#9670;&nbsp;</a></span>noiseBoundForSmall()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::noiseBoundForSmall </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>prob</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assume the polynomial f(x) = sum_{i &lt; k} f_i x^i is chosen so that each f_i is zero with probability 1-prob, 1 with probability prob/2, and -1 with probability prob/2. This returns a bound B such that the L-infty norm of the canonical embedding exceeds B with probability at most epsilon. </p>

</div>
</div>
<a id="ab79e1f941d6043131a14404c68bf538c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab79e1f941d6043131a14404c68bf538c">&#9670;&nbsp;</a></span>noiseBoundForUniform() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::noiseBoundForUniform </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>magBound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>erfc(scale/sqrt(2)) * phi(m) should be less than some negligible parameter epsilon. The default value of 10 should be good enough for most applications. NOTE: -log(erfc(8/sqrt(2)))/log(2) = 49.5 -log(erfc(10/sqrt(2)))/log(2) = 75.8 -log(erfc(11/sqrt(2)))/log(2) = 91.1 -log(erfc(12/sqrt(2)))/log(2) =107.8 The way this is used is as follows. If we have a normal random variable X with variance sigma^2, then the probability that that X lies outside the interval [-scale*sigma, scale*sigma] is delta=erfc(scale/sqrt(2)). We will usually apply the union bound to a vector of phi(m) such random variables (one for each primitive m-th root of unity), so that the probability that that the L-infty norm exceeds scale*sigma is at most epsilon=phim*delta. Thus, scale*sigma will be used as a high-probability bound on the L-infty norm of such vectors. Assume the polynomial f(x) = sum_{i &lt; k} f_i x^i is chosen so that each f_i is chosen uniformly and independently from the interval [-magBound, magBound], and that k = degBound. This returns a bound B such that the L-infty norm of the canonical embedding exceeds B with probability at most epsilon. </p>

</div>
</div>
<a id="ab25e83e61a64ed721a1b710a3b2df82d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab25e83e61a64ed721a1b710a3b2df82d">&#9670;&nbsp;</a></span>noiseBoundForUniform() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">NTL::xdouble helib::Context::noiseBoundForUniform </td>
          <td>(</td>
          <td class="paramtype">NTL::xdouble&#160;</td>
          <td class="paramname"><em>magBound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>degBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a552e300656dfae6eaacace769c03655a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a552e300656dfae6eaacace769c03655a">&#9670;&nbsp;</a></span>numPrimes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::Context::numPrimes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Total number of small prime in the chain. </p>

</div>
</div>
<a id="a3d08d9248d0d3165fa5914b95bd60fdf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d08d9248d0d3165fa5914b95bd60fdf">&#9670;&nbsp;</a></span>operator!=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::Context::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ae6f113ef16d2e6c1ca451411e34eed42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6f113ef16d2e6c1ca451411e34eed42">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::Context::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa10cb4160e67f8fc94dbbcd14be3a7c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa10cb4160e67f8fc94dbbcd14be3a7c5">&#9670;&nbsp;</a></span>productOfPrimes() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">NTL::ZZ helib::Context::productOfPrimes </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="afc6a3c91d2488abe71e82849653b2c40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc6a3c91d2488abe71e82849653b2c40">&#9670;&nbsp;</a></span>productOfPrimes() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::productOfPrimes </td>
          <td>(</td>
          <td class="paramtype">NTL::ZZ &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The product of all the primes in the given set. </p>

</div>
</div>
<a id="a065f668db1a4712692fdd2ea9c70dc47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a065f668db1a4712692fdd2ea9c70dc47">&#9670;&nbsp;</a></span>securityLevel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::securityLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>An estimate for the security-level. </p>

</div>
</div>
<a id="a400f1f138bef615ed0b8f19bdc2bd8ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a400f1f138bef615ed0b8f19bdc2bd8ce">&#9670;&nbsp;</a></span>setModSizeTable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void helib::Context::setModSizeTable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a30037bfeed9ef5a4282e10b92c149801"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30037bfeed9ef5a4282e10b92c149801">&#9670;&nbsp;</a></span>stdDevForRecryption()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::stdDevForRecryption </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>skHwt</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>NOTE: this is a bit heuristic. See design document for details. </p>
<p>This computes a high probability bound on the L-infty norm of x0+s*x1 in the pwrfl basis, assuming is chosen with coeffs in the pwrfl basis uniformly and independently dist'd over [-1/2,1/2], x0 has arbitrary coeffs over [-1/2,1/2] in the pwrfl basis, and assuming s is chosen with skHwt nonzero coeffs mod X^m-1 in the power basis (uniformly and independently over {-1,1}). The bound should be satisfied with probability epsilon. NOTE: this is still valid even when m is a power of 2 </p>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a3f25fcb8f7047c32e2929d9ffbf4ac11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f25fcb8f7047c32e2929d9ffbf4ac11">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write all other data. </p>

</div>
</div>
<a id="a717438f68d2a050214ee4a8a933a7bba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a717438f68d2a050214ee4a8a933a7bba">&#9670;&nbsp;</a></span>operator&gt;&gt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>read all other data associated with context </p>

</div>
</div>
<a id="a40d28a7b77f5735cc6d082452e7126a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40d28a7b77f5735cc6d082452e7126a9">&#9670;&nbsp;</a></span>readContextBase</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void readContextBase </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long &amp;&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>gens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>ords</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>read [m p r] data, needed to construct context </p>

</div>
</div>
<a id="ad1e445830c6007a7f725e100f19dfe6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1e445830c6007a7f725e100f19dfe6a">&#9670;&nbsp;</a></span>readContextBinary</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void readContextBinary </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a3a9a7a348aecd453c92d1c077a9af03d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a9a7a348aecd453c92d1c077a9af03d">&#9670;&nbsp;</a></span>writeContextBase</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void writeContextBase </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>write [m p r] data </p>

</div>
</div>
<a id="a83165f2f0d0a6dd8bb3c3f227e7da1a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83165f2f0d0a6dd8bb3c3f227e7da1a3">&#9670;&nbsp;</a></span>writeContextBinary</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void writeContextBinary </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a9a8689e8a591a15fdf4f1b5eb7b0b80c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a8689e8a591a15fdf4f1b5eb7b0b80c">&#9670;&nbsp;</a></span>alMod</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_p_algebra_mod.html">PAlgebraMod</a> helib::Context::alMod</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The structure of Z[X]/(Phi_m(X),p^r) </p>

</div>
</div>
<a id="a09e894a14a98620a7f129c992468072f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09e894a14a98620a7f129c992468072f">&#9670;&nbsp;</a></span>ctxtPrimes</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::ctxtPrimes</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The "ciphertext primes" are the "normal" primes that are used to represent the public encryption key and ciphertexts. These are all "large" single=precision primes, or bit-size roughly NTL_SP_SIZE bits. </p>

</div>
</div>
<a id="a221facd004b3ace6f11367d6766f9b78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a221facd004b3ace6f11367d6766f9b78">&#9670;&nbsp;</a></span>digits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&gt; helib::Context::digits</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The set of primes for the digits. </p>
<p>The different columns in any key-switching matrix contain encryptions of multiplies of the secret key, sk, B1*sk, B2*B1*sk, B3*B2*B1*sk,... with each Bi a product of a few "non-special" primes in the chain. The digits data member indicate which primes correspond to each of the Bi's. These are all <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> objects, whose union is the subset ctxtPrimes.</p>
<p>The number of Bi's is one less than the number of columns in the key switching matrices (since the 1st column encrypts sk, without any Bi's), but we keep in the digits std::vector also an entry for the primes that do not participate in any Bi (so digits.size() is the same as the number of columns in the key switching matrices). See section 3.1.6 in the design document (key-switching). </p>

</div>
</div>
<a id="a8319e609dbde819ac81130b035711fee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8319e609dbde819ac81130b035711fee">&#9670;&nbsp;</a></span>ea</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&gt; helib::Context::ea</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A default <a class="el" href="classhelib_1_1_encrypted_array.html" title="A simple wrapper for a smart pointer to an EncryptedArrayBase. This is the interface that higher-leve...">EncryptedArray</a>. </p>

</div>
</div>
<a id="a739f1b2cb1d0738bcdd8e5474fb05922"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a739f1b2cb1d0738bcdd8e5474fb05922">&#9670;&nbsp;</a></span>modSizes</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a> helib::Context::modSizes</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A helper table to map required modulo-sizes to primeSets. </p>

</div>
</div>
<a id="a26f5e8b08576bf2ab4632bc8234243e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26f5e8b08576bf2ab4632bc8234243e2">&#9670;&nbsp;</a></span>pwfl_converter</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;const <a class="el" href="classhelib_1_1_powerful_d_c_r_t.html">PowerfulDCRT</a>&gt; helib::Context::pwfl_converter</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af6b7e88d642f51a00c08263aebaa2e20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6b7e88d642f51a00c08263aebaa2e20">&#9670;&nbsp;</a></span>rcData</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_thin_recrypt_data.html">ThinRecryptData</a> helib::Context::rcData</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bootstrapping-related data in the context. </p>

</div>
</div>
<a id="a86b3d6e90031da9bc9cef6f46e9e9bda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86b3d6e90031da9bc9cef6f46e9e9bda">&#9670;&nbsp;</a></span>scale</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double helib::Context::scale</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1a9dbcc75c6cf5116b8114dccc1f1ab7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a9dbcc75c6cf5116b8114dccc1f1ab7">&#9670;&nbsp;</a></span>slotRing</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="structhelib_1_1_poly_mod_ring.html">PolyModRing</a>&gt; helib::Context::slotRing</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The structure of a single slot of the plaintext space. </p>
<p>This will be Z[X]/(G(x),p^r) for some irreducible factor G of Phi_m(X). </p>

</div>
</div>
<a id="a9d52169353df3e667210c59c1643e316"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d52169353df3e667210c59c1643e316">&#9670;&nbsp;</a></span>smallPrimes</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::smallPrimes</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Yet a third set of primes, aimed at allowing modulus-switching with higher resolution. These are somewhat smaller single-precision primes, of size from NTL_SP_SIZE-20 to NTL_SP_SIZE-1. </p>

</div>
</div>
<a id="a4237638ccaec9233a0c7edaf334343b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4237638ccaec9233a0c7edaf334343b2">&#9670;&nbsp;</a></span>specialPrimes</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::Context::specialPrimes</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A disjoint set of primes, used for key switching. See section 3.1.6 in the design document (key-switching). These too are "large" single=precision primes, or bit-size close to NTL_SP_SIZE bits. </p>

</div>
</div>
<a id="ad2eaf7ce504e725b8e6be631ff276efc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2eaf7ce504e725b8e6be631ff276efc">&#9670;&nbsp;</a></span>stdev</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTL::xdouble helib::Context::stdev</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>sqrt(variance) of the LWE error (default=3.2) </p>

</div>
</div>
<a id="ab261446cf0a635a7bf1edf081df48d81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab261446cf0a635a7bf1edf081df48d81">&#9670;&nbsp;</a></span>zMStar</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_p_algebra.html">PAlgebra</a> helib::Context::zMStar</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The structure of Zm*. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/HElib/include/helib/<a class="el" href="_context_8h_source.html">Context.h</a></li>
<li>/HElib/src/<a class="el" href="_context_8cpp.html">Context.cpp</a></li>
<li>/HElib/src/<a class="el" href="prime_chain_8cpp.html">primeChain.cpp</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_context_html_a40d28a7b77f5735cc6d082452e7126a9"><div class="ttname"><a href="classhelib_1_1_context.html#a40d28a7b77f5735cc6d082452e7126a9">helib::Context::readContextBase</a></div><div class="ttdeci">friend void readContextBase(std::istream &amp;str, unsigned long &amp;m, unsigned long &amp;p, unsigned long &amp;r, std::vector&lt; long &gt; &amp;gens, std::vector&lt; long &gt; &amp;ords)</div><div class="ttdoc">read [m p r] data, needed to construct context</div><div class="ttdef"><b>Definition:</b> Context.cpp:464</div></div>
<div class="ttc" id="aclasshelib_1_1_context_html_a08ad8299f225b9f8603f8936a98c2453"><div class="ttname"><a href="classhelib_1_1_context.html#a08ad8299f225b9f8603f8936a98c2453">helib::Context::Context</a></div><div class="ttdeci">Context(unsigned long m, unsigned long p, unsigned long r, const std::vector&lt; long &gt; &amp;gens=std::vector&lt; long &gt;(), const std::vector&lt; long &gt; &amp;ords=std::vector&lt; long &gt;())</div><div class="ttdef"><b>Definition:</b> Context.cpp:569</div></div>
<div class="ttc" id="aclasshelib_1_1_context_html_a3a9a7a348aecd453c92d1c077a9af03d"><div class="ttname"><a href="classhelib_1_1_context.html#a3a9a7a348aecd453c92d1c077a9af03d">helib::Context::writeContextBase</a></div><div class="ttdeci">friend void writeContextBase(std::ostream &amp;str, const Context &amp;context)</div><div class="ttdoc">write [m p r] data</div><div class="ttdef"><b>Definition:</b> Context.cpp:405</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
